package com.example.pengxiangedupay.common.constant;

public enum FEE_TYPE {

    ;


    private String name;
    private Integer code;

    FEE_TYPE(String name, Integer code) {
        this.name = name;
        this.code = code;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
    public static String getValue(Integer code) {
        for (FAMILY_HARDSHIP_TYPE value : FAMILY_HARDSHIP_TYPE.values()) {
            if (value.getCode().equals(code)) {
                return value.getName();
            }
        }
        return null;
    }

    public static Integer getCode(String name) {
        for (FAMILY_HARDSHIP_TYPE value : FAMILY_HARDSHIP_TYPE.values()) {
            if (value.getName().equals(name)) {
                return value.getCode();
            }
        }
        return null;
    }
}
